package kotlinx.coroutines.script

import kotlinx.coroutines.script.tes.phoneScreenHeight
import kotlinx.coroutines.script.tes.phoneScreenWidth
import kotlinx.coroutines.script.tes.pt
import v9.assist.access.btnInviteBlackClose
// import v9.assist.access.btnAtvConfirm
import v9.assist.access.btnInviteCancel
import v9.assist.access.btnInviteConfirm
import v9.assist.access.btnPopTxtCancel
import v9.assist.access.btnPopTxtConfirm
import v9.assist.access.btnReviveInCity
import v9.assist.access.btnReviveInHere
import v9.assist.analyst.smallMap

object CComponents {
    val reopenGame = Block("打开游戏", phoneScreenWidth / 2 - 25.pt, 764.pt, 50.pt, 2.pt)
    val reopenGameRole = Block("点击选取角色", phoneScreenWidth - 280.pt, 900.pt, 20.pt, 10.pt)

    val centerLine = Block(C.V_CENTER_LINE, phoneScreenWidth / 2 - 2.pt, 0, 4.pt, phoneScreenHeight)
    val centerButton = Block("中心点", phoneScreenWidth / 2 - 20.pt, phoneScreenHeight / 2 - 20.pt, 40.pt, 40.pt)
    val centerBody =  Block("中心点X", phoneScreenWidth / 2, 550.pt, 0, 0)

    val mapTransfer by lazy {
//        Block("地图传送", (phoneScreenWidth - 305.pt) / 2, 410.pt, 305.pt, 70.pt)
        Block("地图传送", (phoneScreenWidth - 305.pt) / 2, 600.pt, 305.pt, 70.pt)
    }
    val pathfinding by lazy {
        Block("继续自动寻路", phoneScreenWidth / 2 + 115.pt, 616.pt, 58.pt, 58.pt)
    }

    val reviveInCenter by lazy {
        Block("古堡就地复活", phoneScreenWidth / 2 - 180.pt, 710.pt, 360.pt, 60.pt)
    }
    val reviveInCity by lazy {
        Block(btnReviveInCity, phoneScreenWidth / 2 - 620.pt, 700.pt, 440.pt, 70.pt)
    }
    val reviveInCityFixedClick by lazy {
        Block(btnReviveInCity, phoneScreenWidth / 2 - 420.pt, 700.pt, 240.pt, 70.pt)
    }
    val reviveInHere by lazy {
        Block(btnReviveInHere, phoneScreenWidth / 2 + 180.pt, 700.pt, 440.pt, 70.pt)
    }
    val reviveByOtherCancel by lazy {
        Block("不接受被玩家复活", phoneScreenWidth / 2 - 335.pt, 570.pt, 290.pt, 60.pt)
    }
    val checkReviveByOtherCancel by lazy {
        Block("不接受被玩家复活检测", reviveByOtherCancel.left + 50.pt, reviveByOtherCancel.top + 20.pt,  20.pt, 20.pt)
    }
    val reviveByOtherAccept by lazy {
        Block("接受被玩家复活(弹窗确认)", phoneScreenWidth / 2 + 35.pt, 570.pt, 290.pt, 60.pt)
    }
    val immBackEnter by lazy {
        Block("返回不朽秘境入口", phoneScreenWidth / 2 + 460.pt, 570.pt, 80.pt, 60.pt)
    }
    val immFastRestart by lazy {
        Block("重刷秘境", phoneScreenWidth / 2 - 560.pt, 570.pt, 80.pt, 60.pt)
    }
    val checkReviveByOtherAccept by lazy {
        Block("接受被玩家复活检测", reviveByOtherAccept.left + 50.pt, reviveByOtherAccept.top + 20.pt, 20.pt, 20.pt)
    }
    val checkRandomLeft by lazy {
        Block("随即效果左", phoneScreenWidth / 2 - 230.pt, 830.pt, 60.pt, 40.pt)
    }
    val checkRandomRight by lazy {
        Block("随即效果右", phoneScreenWidth / 2 + 160.pt, 830.pt, 60.pt, 40.pt)
    }
    val checkRandomCenterText by lazy {
        Block("随即效果中间", phoneScreenWidth / 2 - 40.pt, 830.pt, 80.pt, 40.pt)
    }
    val sceneRandomButton by lazy {
        Block("随即效果按钮", phoneScreenWidth / 2 - 100.pt, 830.pt, 200.pt, 50.pt)
    }
    val activeOkButton  by lazy {
        Block("活动确认", phoneScreenWidth / 2 - 90.pt, 860.pt, 180.pt, 40.pt)
    }
    val inviteCancel by lazy {
        Block(btnInviteCancel, phoneScreenWidth / 2 - 270.pt, 670.pt, 250.pt, 60.pt)
    }
    val checkInviteCancel by lazy {
        // 有带倒计时的
        Block("邀请取消检测", inviteCancel.left + 30.pt, inviteCancel.top + 20.pt,  15.pt, 20.pt)
    }
    val checkInviteCancelTop by lazy {
        // 有带倒计时的
        Block("邀请取消检测顶部块", inviteCancel.left + 30.pt, inviteCancel.top - 50.pt,  20.pt, 20.pt)
    }
    val inviteConfirm by lazy {
        Block(btnInviteConfirm, phoneScreenWidth / 2 + 20.pt, 670.pt, 250.pt, 60.pt)
    }
    val checkInviteConfirm by lazy {
        // 有带倒计时的
        Block("邀请确认检测", inviteConfirm.left + 30.pt, inviteConfirm.top + 20.pt, 15.pt, 20.pt)
    }
    val fishExitCancelTop by lazy {
        // 有带倒计时的
        Block("邀请取消检测顶部块", fishExitCancel.left + 30.pt, fishExitCancel.top - 50.pt,  20.pt, 20.pt)
    }
    val fishExitCancel by lazy {
        Block("钓鱼退出取消", phoneScreenWidth / 2 - 280.pt, 580.pt, 200.pt, 40.pt)
    }
    val fishExitConfirm by lazy {
        Block("钓鱼退出确认", phoneScreenWidth / 2 + 80.pt, 580.pt, 200.pt, 40.pt)
    }

    val bodyA by lazy {
        Block("角色周围", phoneScreenWidth / 2 - 400.pt, phoneScreenHeight / 2 - 300.pt, 800.pt, 600.pt)
    }
    val checkTransmitting by lazy {
        Block("传送条检测", phoneScreenWidth / 2 - 204.pt, 755.pt,
            22.pt, // 36.pt,
            5.pt)
    }
    val checkTransmittingBorderLeft by lazy {
        Block("传送条边缘(左)检测", phoneScreenWidth / 2 - 235.pt, 742.pt, 20.pt, 20.pt)
    }
    val checkTransmittingBorderRight by lazy {
        Block("传送条边缘(右)检测", phoneScreenWidth / 2 + 214.pt, 742.pt, 20.pt, 20.pt)
    }
    val talkContent by lazy {
        Block("对话框", phoneScreenWidth / 2 - 150.pt, 760.pt, 300.pt, 100.pt)
    }
    val fishAll by lazy {
        Block("鱼全选",  phoneScreenWidth / 2 - 20.pt, 880.pt, 40.pt, 40.pt)
    }
    val equipmentDecompositionW by lazy {
        Block("白",  phoneScreenWidth / 2 - 180.pt, 880.pt, 40.pt, 40.pt)
    }
    val equipmentDecompositionB by lazy {
        Block("蓝",  phoneScreenWidth / 2 - 100.pt, equipmentDecompositionW.top, 40.pt, 40.pt)
    }
    val equipmentDecompositionY by lazy {
        Block("黄",  phoneScreenWidth / 2 - 20.pt, equipmentDecompositionW.top, 40.pt, 40.pt)
    }
    val cancelDecompositionDialog by lazy {
        Block("取消弹窗",  phoneScreenWidth / 2 + 80.pt, equipmentDecompositionW.top, 40.pt, 40.pt)
    }

    val waitOtherCancel by lazy {
        Block(btnPopTxtCancel, phoneScreenWidth / 2 - 280.pt, 590.pt, 200.pt, 40.pt)
    }
    val waitOtherConfirm by lazy {
        Block(btnPopTxtConfirm, phoneScreenWidth / 2 + 100.pt, 590.pt, 200.pt, 40.pt)
    }
    val clearUpConfirm by lazy {
        Block("铁匠确定勾选", phoneScreenWidth / 2 + 40.pt, 580.pt, 280.pt, 50.pt)
    } // 可以用这个
    val castleFinished by lazy {
        Block("古堡完成", phoneScreenWidth / 2 - 140.pt, 320.pt, 280.pt, 100.pt)
    }
    val myBLFinished by lazy {
        Block("魔域堡垒完成", phoneScreenWidth / 2 - 120.pt, 340.pt, 240.pt, 100.pt)
    }
    val netError by lazy {
        Block("断网重连",  phoneScreenWidth / 2 + 65.pt, 590.pt, 20.pt, 20.pt)
    }

    val appEnterOk by lazy {
        Block("我知道了",  phoneScreenWidth / 2 - 5.pt, 770.pt, 100.pt, 20.pt)
    }

//    val buttonCastleConvertGroup by lazy {
//        Block("古堡团队转化按钮", phoneScreenWidth / 2 + 100.pt, 590.pt, 120.pt, 40.pt)
//    }
    @Deprecated("手动处理?") val buttonConvertGroup by lazy {
        Block("团队转化按钮", phoneScreenWidth / 2 + 170.pt, 590.pt, 60.pt, 20.pt)
    }
    val buttonSceneGoOn by lazy {
//        val origin = Block("再来一把", phoneScreenWidth / 2 - 400.pt, 480.pt, 120.pt, 120.pt)
//        // 往上移动一点. 避免触发摇杆的点击区域
//        Block(origin.name, origin.left, 390.pt, origin.width, origin.height)
        Block("再来一把", phoneScreenWidth / 2 - 260.pt, 300.pt, 120.pt, 400.pt)
    }
    val buttonImmGoOn by lazy {
        Block("秘境再来一把", phoneScreenWidth / 2 + 400.pt, 480.pt, 40.pt, 40.pt)
    }
    val buttonSceneMenuClose by lazy {
        Block("再来一把关闭", phoneScreenWidth / 2 + 740.pt, 140.pt, 40.pt, 40.pt)
    }
    val sceneNpcChatPart by lazy {
        Block("副本NPC聊天检测", phoneScreenWidth / 2 - 300.pt, 720.pt, 600.pt, 30.pt)
    }
    val sceneNpcChatPart2 by lazy {
        Block("副本NPC聊天检测2", phoneScreenWidth / 2 - 300.pt, 870.pt, 600.pt, 30.pt)
    }

    val applyPageTitle by lazy {
        Block("邀请弹窗标题检测", phoneScreenWidth / 2 - 500.pt, 170.pt, 1000.pt, 2.pt)
    }
    val applyButtonLeft by lazy {
        Block("邀请弹窗拒绝检测", phoneScreenWidth / 2 - 500.pt, 780.pt, 20.pt, 20.pt)
    }
    val applyButtonRight by lazy {
        Block("邀请弹窗同意检测", phoneScreenWidth / 2 + 210.pt, 780.pt, 20.pt, 20.pt)
    }
    val inviteContent by lazy { Block("昵称6字", phoneScreenWidth / 2 - 270.pt, 510.pt, 180.pt, 32.pt) }

//    val inPageFAQ1 by lazy {
//        Block("FAQ右侧黑色", phoneScreenWidth - 40.pt, 400.pt, 10.pt, 400.pt)
//    }
//    val inPageFAQ2 by lazy {
//        Block("FAQ底部棕色", phoneScreenWidth / 2 - 400.pt, 960.pt, 800.pt, 10.pt)
//    }
    val pageFAQClose by lazy {
        Block("FAQ底部关闭", phoneScreenWidth - 70.pt, 940.pt, 40.pt, 30.pt)
    }

    val checkEnterTipLeft by lazy {
        Block("检查公告左侧", phoneScreenWidth / 2 - 500.pt, 760.pt, 100.pt, 20.pt)
    }
    val checkEnterTipRight by lazy {
        Block("检查公告右侧", phoneScreenWidth / 2 - 500.pt, 760.pt, 100.pt, 20.pt)
    }
    val checkEnterTipButton by lazy {
        Block("检查公告按钮", phoneScreenWidth / 2 - 150.pt, 760.pt, 300.pt, 40.pt)
    }

    val checkEnterIcon1Book by lazy {
        Block("启动页协议", phoneScreenWidth - 116.pt, 80.pt, 40.pt, 40.pt)
    }
    val checkEnterIcon2User by lazy {
        Block("启动页用户", phoneScreenWidth - 116.pt, 195.pt, 40.pt, 40.pt)
    }
    val checkEnterIcon3Tip by lazy {
        Block("启动页公告", phoneScreenWidth - 116.pt, 300.pt, 40.pt, 40.pt)
    }

    val blackClose by lazy {
        Block("暗影邀请关闭B", phoneScreenWidth / 2 + 260.pt, 75.pt, 40.pt, 40.pt)
    }

    val sceneInviteGroupAllClose by lazy {
        Block("邀请加入团队总览关闭", phoneScreenWidth / 2 + 740.pt, 140.pt, 40.pt, 40.pt)
    }

    val sceneInviteGroupPlayerBtn1 by lazy {
        Block("邀请加入按钮1", phoneScreenWidth / 2 + 110.pt, 356.pt, 30.pt, 30.pt)
    }
    val sceneInviteGroupPlayerBtn2 by lazy {
        Block("邀请加入按钮2", phoneScreenWidth / 2 + 110.pt, 500.pt, 30.pt, 30.pt)
    }
    val sceneInviteGroupEmpty by lazy {
        Block("邀请加入空数据", phoneScreenWidth / 2 + 135.pt, 530.pt, 50.pt, 50.pt)
    }
    val sceneStartNormal by lazy {
        Block("副本普通难度", smallMap.right - 620.pt, 194.pt, 20.pt, 36.pt)
    }
    val sceneStartHard by lazy {
        Block("副本远古难度", smallMap.right - 220.pt , 194.pt, 20.pt, 36.pt)
    }
    val checkFriendClose by lazy {
        Block("设置好友备注(关闭)", phoneScreenWidth / 2 + 290.pt, 100.pt, 40.pt, 40.pt)
    }
    val popApplyClose by lazy {
        Block("申请列表(关闭)", phoneScreenWidth / 2 + 754.pt, 140.pt, 40.pt, 40.pt)
    }
    val sceneAgainIconLeft by lazy {
        Block("再次挑战图标", phoneScreenWidth / 2 - 360.pt, 480.pt, 40.pt, 40.pt)
    }
    val sceneAgainIconRight by lazy {
        Block("离开图标", phoneScreenWidth / 2 - 340.pt, 490.pt, 40.pt, 20.pt)
    }

    val lxTempEnter1 by lazy {
        Block("临时进入1", phoneScreenWidth / 2 + 20.pt, 380.pt, 200.pt, 40.pt)
    }
    val lxTempEnter2 by lazy {
        Block("临时进入2", phoneScreenWidth / 2 + 20.pt, 460.pt, 200.pt, 40.pt)
    }
    val lxUseConfirmClose by lazy {
        Block("利息精华使用关闭", phoneScreenWidth / 2 + 350.pt, 330.pt, 40.pt, 40.pt)
    }
    val lxUseConfirmBtn by lazy {
        Block("利息精华确认按钮", phoneScreenWidth / 2 - 130.pt, 580.pt, 40.pt, 40.pt)
    }

    val blackInviteClose by lazy {
        Block(btnInviteBlackClose, phoneScreenWidth / 2 + 260.pt, 75.pt, 40.pt, 40.pt)
    }

}